package design.pattern.factory.simple$factory;

/**
 * @author AtoVio, Winter Yuan
 */
public class CoffeeStore {

    public Coffee orderCoffee(CoffeeType type) {
        SimpleCoffeeFactory factory = new SimpleCoffeeFactory();
        Coffee coffee = factory.createCoffee(type);
        // 加配料
        addThings(coffee);
        return coffee;
    }

    private void addThings(Coffee coffee) {
        coffee.addSugar();
        coffee.addMilk();
    }
}
